package com.amose.springcloudconsumerfeign;

import com.amose.serviceapi.User;
import com.amose.serviceapi.UserFeignClient;
import org.springframework.web.bind.annotation.*;

@RestController
public class UserController implements UserFeignClient {


    @Override
    public String sayHello(Long id, String name, Integer age) {
        return id+"-"+name+"-"+age;
    }

    @Override
    public String createUser(User user) {
        return "创建成功";
    }

    @Override
    public String updateUser(Long id, User user) {
        return "更新成功";
    }

    @Override
    public String deleteUser(Long id) {
        return "删除成功";
    }

    @Override
    public User getById(Long id) {
        return new User(1L,"amose",18);
    }
}
